1. Field of the Invention
The present invention relates to a method of simplifying psychoacoustic analysis, and more particularly, to a method of simplifying psychoacoustic analysis by utilizing spectral flatness for an audio compression system.
2. Description of the Prior Art
With rapid development of electronic video products, video compression technology applied to the electronic video products is more and more important, in which the Motion Picture Experts Group (MPEG) is indeed a mainstream for the video compression.
Please refer to FIG. 1, which is a diagram of an operation process 10 of an audio encoder utilizing a video compression standard according to the prior art. An analog sound signal is transformed to a digital sound signal via pulse-code modulation (PCM) (Step 100). The digital sound signal is divided into M frequency bands in multiple frequency domains via subband filtering (Step 102), transformed to frequency domain values via modified discrete cosine transform (MDCT) (Step 104) and middle/side transform (M/S transform) (Step 106), sent to a re-quantizing module for quantizing (Step 108), and finally becomes format bitstream (Step 110). In order to compress the sound signal efficiently, the sound signal needs to be analyzed for obtaining certain parameters. Therefore, the parameters of the sound signal, such as a block type, a middle/side type (M/S type) and masking threshold, are obtained by the PCM, subband filtering, Fast Fourier Transform (FFT) (Step 112), and psychoacoustic model analysis (Step 114). The block type is an important parameter for performing the MDCT. The M/S type is an important parameter for deciding whether the M/S transform is utilized. The masking threshold is an important parameter for the re-quantizing module performing quantization.
Before the MDCT is executed, the block type needs to be determined for transforming the sound signal, namely the sound signal is suitable for a long-block or a short-block MDCT to transform. The long-block MDCT is utilized if the sound signal is a short-term stationary signal, and the short block MDCT is utilized if the sound signal has a transition, to avoid pre-echo noise.
Please refer to FIG. 2, which is a diagram of a process 20 determining a block type according to the prior art. A sound signal goes through the PCM (Step 200), long-block psychoacoustic model analysis (Step 202), and then is determined whether the short-block MDCT is utilized (Step 204). If the short-block MDCT is utilized, the sound signal re-executes the short-block MDCT (Step 206), and executes short-block psychoacoustic model analysis (Step 207). If the short-block MDCT is not utilized, the sound signal performs the M/S transform or other sound encoding (Step 208). Therefore, no matter which block type the sound signal belongs to, the long-block psychoacoustic model analysis is preset to execute in Step 202 according to the prior art. The short-block psychoacoustic model analysis is re-executed in Step 207 when the sound signal is determined to utilize the short-block MDCT in Step 204. In this situation, the calculation in Step 202 is unnecessary, and increases an amount of the calculation. Moreover, in Step 204, the perceptual entropy is usually utilized for determining whether the short-block MDCT is utilized. As a result, the short-block MDCT is utilized for transforming the sound signal when the perceptual entropy is greater than a preset value.
In addition, when spectral characteristic of left and right channel signals of the sound signal are similar, the M/S transform can remove correlation of the left and right channel signals, and then compress the sound signal, to increase efficiency of compression. For example, if the left channel signal of the sound signal is defined as L[n], and the right channel signal is defined as R[n], then the middle signal is defined as M[n]=√{square root over (2)}×(L[n]+R[n])/2, and the side signal is defined as S[n]=√{square root over (2)}×(L[n]−R[n])/2. As can be seen, the middle signal is the same part of the left and right channel signals, and the side signal is the different part of the left and right channel signals. Therefore, the M/S transform can decrease data amount and increase efficiency of compression. As a result, determining whether the spectral characteristic of the left and right channel signals are similar can determine whether the M/S transform is suitable for the sound signal.
Please refer to FIG. 3, which is a diagram of a process 30 determining characteristic of the left and right channel signals according to the prior art. In the prior art, the left and right channel signals go through the psychoacoustic model analysis (Step 300), and then are determined whether the M/S transform is suitable. If the M/S transform is suitable, the left and right channel signals are transformed by the M/S transform; otherwise, the left and right channel signals undergo sound encoding (Step 306), such as undergo quantization with re-quantizing module. Therefore, if the left and right channel signals are suitable for utilizing the M/S transform, the left and right channel signals going through the psychoacoustic model analysis in Step 300 become unnecessary, which increases an amount of calculation.
Therefore, the abovementioned processes 20 and 30 may increase an amount of the calculation, and affect efficiency of the system.